
	 /**  
	 * Project Name:Maven_Web  
	 * File Name:BaseBusinessException.java  
	 * Package Name:com.sg.common.Exception  
	 * Date:2017年12月11日上午11:27:15 
	 *  
	*/  
	  
	package com.sg.common.exception;

import com.sg.fileService.common.ErrorCode;

/**  
 * ClassName:BaseBusinessException <br/>  
 * Reason:   业务异常基础类 <br/>  
 * Date:     2017年12月11日 上午11:27:15 <br/>  
 * @author   xzk  
 * @version    
 * @since    JDK 1.8  
 * @see        
 */
public class BaseBusinessException extends Exception {
		 
	private static final long serialVersionUID = 1L;
	/**
	 * 异常码
	 */
	private final String errorCode;
	/**
	 * 异常信息
	 */
	private final String errorMessage;
	
	public BaseBusinessException(String errorCode,String errorMessage){
		super(errorMessage);
		this.errorCode = errorCode;
		this.errorMessage = errorMessage;
	}
	
	public BaseBusinessException(String errorMessage){
		super(errorMessage);
		this.errorCode = "";
		this.errorMessage = errorMessage;
	}
	
	public BaseBusinessException(ErrorCode error){
		super(error.getCodeMessage());
		this.errorCode = error.getErrorCodeValue();
		this.errorMessage = error.getCodeMessage();
	}

	public String getErrorCode() {
	
		return errorCode;
	}

	public String getErrorMessage() {
	
		return errorMessage;
	}

	
	
}
  
	